package com.redis;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * Created by Juzhenbao on 2019/9/4.
 */
@RunWith(SpringRunner.class)
@SpringBootTest(classes={Application.class})// 指定启动类
public class TestApplication {

    @Autowired
    RedisService redisService;

    @Test
    public void setRedisMap() {
        {
            try {
                City c = new City();
                c.setCityId(22);
                c.setCityIntroduce("123");
                c.setCityName("12345");
                redisService.set2("22",c);
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }


}
